import request from '@/utils/request'

// 查询订单取消列表
export function listCancel(query) {
  return request({
    url: '/orders/cancel/list',
    method: 'get',
    params: query
  })
}

// 查询订单取消详细
export function getCancel(cancelId) {
  return request({
    url: '/orders/cancel/' + cancelId,
    method: 'get'
  })
}

// 新增订单取消
export function addCancel(data) {
  return request({
    url: '/orders/cancel',
    method: 'post',
    data: data
  })
}

// 修改订单取消
export function updateCancel(data) {
  return request({
    url: '/orders/cancel',
    method: 'put',
    data: data
  })
}

// 删除订单取消
export function delCancel(cancelId) {
  return request({
    url: '/orders/cancel/' + cancelId,
    method: 'delete'
  })
}
